﻿#include "UdpCodec_SensorData.h"

#include "MEMSDataCodec.h"


UdpCodec_SensorData::UdpCodec_SensorData()
{
  setObjectName(getClassNameFirstLow<UdpCodec_SensorData>());
}

UdpCodec_SensorData::~UdpCodec_SensorData()
{

}

DataPackage_UdpCodec* UdpCodec_SensorData::decode(DataPackage_UdpCodec* dataPackageInfo_Device)
{
  mEMSDataCodec->slot_decode(dataPackageInfo_Device->getData());
  return Q_NULLPTR;
}

MEMSDataCodec* UdpCodec_SensorData::getMEMSDataCodec()const
{
  return mEMSDataCodec;
}

UdpCodec_SensorData* UdpCodec_SensorData::setMEMSDataCodec(MEMSDataCodec * const mEMSDataCodec)
{
  this->mEMSDataCodec=mEMSDataCodec;
  printInjection(this,mEMSDataCodec);
  return this;
}

void UdpCodec_SensorData::objectAutoInjection(QHash<QString, QObject *> *objMap)
{
  setMEMSDataCodec(getObjFromMap<MEMSDataCodec>(objMap));
}
